{% extends 'accounts/base.html' %}
{% load i18n admin_static static %}
{% block title %}{{ title }} 数据中心运维平台{% endblock %}

{% block body %}
<body class="hold-transition login-page">
  <div class="login-box">
    <div class="login-logo">
      <a href="{% url 'idcops:index' %}"><b>IDC 运维管理平台</b></a>
    </div>
    <!-- /.login-logo -->
    <div class="login-box-body">
      <p class="login-box-msg">{% trans 'Password reset confirmation' %}</p>

      {% if validlink %}

      <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
      
      <form method="post">{% csrf_token %}

        <div class="form-group has-feedback">
            {{ form.new_password1.errors }}
            <label for="id_new_password1">{% trans 'New password:' %}</label>
            <input type="password" name="new_password1" required="" id="id_new_password1" class="form-control" autocomplete="off" autofocus="autofocus">
        </div>
        <div class="form-group has-feedback">
            {{ form.new_password2.errors }}
            <label for="id_new_password2">{% trans 'Confirm password:' %}</label>
            <input type="password" name="new_password2" required="" id="id_new_password2" class="form-control" autocomplete="off" autofocus="autofocus">
        </div>
        <div class="row">
            <div class="col-xs-8"></div>
            <div class="col-xs-4">
              <button type="submit" class="btn btn-primary btn-block btn-flat" value="{% trans 'Change my password' %}"> 确定</button>
            </div>
            <!-- /.col -->
          </div>
      </form>
      
      {% else %}
      
      <p>{% trans "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</p>
      
      {% endif %}
    </div>
    <!-- /.login-box-body -->
  </div>
  <!-- /.login-box -->
</body>
{% endblock %}
